#include <stdio.h>
#include <stdlib.h>

char* filename = "fin";

int main(int n, char* av[]){
   FILE* in;
   
   in = fopen( filename, "r" );

   if (in == NULL) {
      fprintf( stderr, " %s: cannot open %s for reading\n", 
                   av[0], filename);
      return -1;
   }

   while ( (feof( in ) != 1) && ( ferror( in ) == 0 )) {
      char c = (char) fgetc( in );
      printf( " %c", c );
   }
   fclose( in );
   return 0;
}
